import uuid

from selenium import webdriver;
from selenium.webdriver import ActionChains
import time;
import requests
from selenium.webdriver.support.select import Select
#https://registry.npmmirror.com/binary.html?path=chromedriver/
#课程网址
user="195277"
password="dmb19950522"
classUrl="http://mooc.baosteel.com/#/course/57082/play";
baseUrl="http://mooc.baosteel.com/#/login"
if __name__ == '__main__':
    dr = webdriver.Chrome(executable_path="C:\\Program Files\\Google\\Chrome\\Application\\chromedriver.exe");
    dr.maximize_window();
    dr.get(baseUrl);
    dr.find_element_by_css_selector('#main > div > div.page-login > div > div.sign_body > div.sign_body_rigth > form:nth-child(1) > div:nth-child(2) > input[type=text]').send_keys(user)
    dr.find_element_by_css_selector('#main > div > div.page-login > div > div.sign_body > div.sign_body_rigth > form:nth-child(1) > div:nth-child(3) > input[type=password]').send_keys(password)
    dr.find_element_by_css_selector('#main > div > div.page-login > div > div.sign_body > div.sign_body_rigth > form:nth-child(1) > div:nth-child(4) > input').send_keys('')
    time.sleep(5)
    dr.find_element_by_css_selector('.sign_btn').click()
    time.sleep(5)

    dr.get(classUrl);
    #section finish half active
    elements=dr.find_elements_by_css_selector('section')
    for element in elements:
        print(element.__class__)